import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/harry";

// 查询人脸闸机时间规则列表
export function findFaceGateRulePageList(query) {
  return request({
    url: '/faceGateRule/findList',
    method: 'get',
    params: query
  })
}

// 获取人脸闸机时间规则数据
export function getFaceGateRule(id) {
  return request({
    url: 'faceGateRule/info/' + praseStrEmpty(id),
    method: 'get'
  })
}

// 新增人脸闸机规则
export function addOrUpdateFaceGateRule(data) {
  return request({
    url: '/faceGateRule/addOrUpdateDevicRule',
    method: 'post',
    data
  })
}

// 删除人脸闸机规则
export function delFaceGatRule(deleteByIds) {
  return request({
    url: '/faceGateRule/deleteFaceRule/' + deleteByIds,
    method: 'delete'
  })
}

export function syncFaceGateRule(type){
  return request({
    url: '/faceGateRule/syncRule/' + type,
    method: 'get'
  })
}
